<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>我的电商系统</title>
	<base href="http://localhost/shop/" />
	<link rel="stylesheet" type="text/css" href="public/css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="public/css/bootstrap-theme.min.css">
	 <link rel="stylesheet" type="text/css" href="public/css/front.css">
</head>
	<div class="container lists">
<!--head-->	
	<?php $this->load->view('header') ?>
<!--banner-->
	<div class="row">
		<div class="col-md-3" id="lists">
			<div class="list-group">
				  <a href="#" class="list-group-item  first"><i class="glyphicon glyphicon-align-justify"></i>
				    <?php echo $parent_catalog->name ?>
				  </a>
				  <?php foreach ($child_catalog as $c) {
				  ?>
				  	 <a href="<?php echo site_url('prodect/lists/'.$c->id) ?>" class="list-group-item <?php if($catalog->id==$c->id) { ?>
				  	 	active
				  	 <?php 
				  	 }?>"><?php echo $c->name ?></a>
				<?php
				  } ?>
			</div>
		</div>
		<div class="col-md-9">
			<table id="table">
				<tr>
					<td class="lab">品牌</td>
					<td class="cont"><?php foreach ($prodect_brand as $p) {
						?>
						<a href="<?php echo current_url().'?brand='.$p->id ?>"><?=$p->name; ?>
						<?php 
					} ?></a></td>
				</tr>
				<tr>
					<td class="lab">单反级别</td>
					<td class="cont">入门级 中级 高级</td>
				</tr>
				<tr>
					<td class="lab">屏幕尺寸</td>
					<td class="cont">3英寸 3.2英寸</td>
				</tr>
				<tr>
					<td class="lab">价格</td>
					<td class="cont">360以下元 1360-2720元 2720-4080元 6800以上元</td>
				</tr>
			</table>
			<br/>
			<table id="table2">
				<tr>
					<td class="nav">默认</td>
					<td class="nav">销量</td>
					<td class="nav">评价</td>
					<td class="nav">评论</td>
					<td class="nav">新品</td>
					<td id="block"></td>
				</tr>
			</table>
			<br/>
		<div class="row">
			<?php foreach ($prodect_son as $ps) {
				?>
				<div class="item col-md-3 clearfix">
				<img src="<?php echo base_url($ps->img) ?>" class="image">
				<ul>
					<?php 					
					$imgs=$this->Prodect_img_model->get_by_prodect_id($ps->id);
					foreach ($imgs as $i) {
					 ?>
						 <li><img src="<?php echo base_url($i->url) ?>"  clearfix"></li>
					<?php
					 } ?>
					 <h5><a href="<?php echo site_url('prodect/detail/'.$ps->id)?>"><?php echo $ps->title?></a></h5>
					<p>￥<?php echo $ps->price?></p>
					<a href="<?php echo site_url('prodect/detail/'.$ps->id)?>" class="btn btn-danger">立即购买</a>
				</ul>
			</div> 
		
			<?php
			} ?>
		
			
		</div>
	</div>	
	</div>

	</div>
<script type="text/javascript" src="<?php echo base_url();?>public/js/jquery.min.js"></script>
	<script type="text/javascript">
		 $(window).load(function(){
	    	$('.lists .item ul li').mouseover(function(){	
				$(this).parents('.lists .item').find('ul li').removeClass("hover");
	    		$(this).addClass('hover');
	    		var src=$(this).find('img').attr('src');
	    		$(this).parents('.lists .item').find('.image').attr('src',src);	
	    	});
	    });	
	</script>

	
</html>
